package com.littrabble.sort;

public class Insert {

	public static void sort(int[] data, int n) {

		for (int i = 1; i < n; i++) {
			int j = i - 1;
			int tmp = data[i];

			while (j >= 0 && tmp < data[j]) {
				data[j + 1] = data[j];
				j--;
			}

			data[j + 1] = tmp;
		}
	}
}
